#pragma once

#include <fcntl.h>


int SetNoBlock(int fd)
{
    int fl = fcntl(fd, F_GETFL);
    fl |= O_NONBLOCK;
    int n = fcntl(fd, F_SETFL, fl); 
    return n;
}
